package main

import "fmt"

func checkPerfectNumber(num int) bool {
	var sum = 1
	var d = 2
	for ; d*d < num; d++ {
		if num%d == 0 {
			sum += d
			sum += num / d
		}
	}
	return sum == num && num > 1
}

func main() {
	fmt.Println(checkPerfectNumber(28))
}
